﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.Data;
using System.Data.SqlClient;

namespace BUS
{
    public class MonAnBUS
    {
        public static SqlConnection CreateConnection()
        {
            return MonAnDAO.CreateConnection();
        }

        public static DataTable SelectMonAnAll(ref int tongMonAn)
        {
            return MonAnDAO.SelectMonAnAll(ref tongMonAn);
        }

        public static MonAnDTO SelectMonAnById(string maMonAn)
        {
            return MonAnDAO.SelectMonAnById(maMonAn);
        }

        public static bool InsertMonAn(MonAnDTO monAnDTO)
        {
            return MonAnDAO.InsertMonAn(monAnDTO);
        }

        public static bool UpdateMonAnById(MonAnDTO monAnDTO)
        {
            return MonAnDAO.UpdateMonAnById(monAnDTO);
        }

        public static bool DeleteMonAnById(string maMon)
        {
            return MonAnDAO.DeleteMonAnById(maMon);
        }

        public static string CreateMonAnId()
        {
            return MonAnDAO.CreateMonAnId();
        }
    }
}
